-
-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HydraContext #1581
Add HydraContext #1581
Conversation
3100fc6
to
265feaf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looking food.
See inline questions.
@@ -130,14 +130,15 @@ def __init__(self, ax_config: AxConfig, max_batch_size: Optional[int]): | |||
|
|||
def setup( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to release updates to all the sweepers and launchers when we make the first dev release including this.
@@ -57,6 +60,7 @@ def launch_job_on_ray( | |||
run_job_ray = ray.remote(_run_job) | |||
|
|||
ret = run_job_ray.remote( | |||
hydra_context=hydra_context, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is different because the function did not take config_loader before.
Can you explain why it needs the hydra_context now?
Good point! This sounds better as a separate PR. I've created #1589 to track this.
moved!
yea, I've created #1590 to track this and assigned to myself.
yep. |
This pull request introduces 2 alerts when merging 3e674d8 into c6b7143 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change. Can you include an appropriate news fragment?
rebase and added a news fragment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shipit
Plugin users
Upgrade the offending plugin, if it's still not resolved contact the plugin owner and ask for Hydra 1.1 support.
Plugin owners
This change is required to enable support for Hydra Callbacks and to remain compatible with future versions of Hydra. (Discussion doc).
The following apply to both Sweeper and Launcher plugins:
hydra_context
is a required field for the setup function of these plugins and forrun_job
(typically called from Launchers)config_loader
is removed from Launcher, Sweeper'ssetup()
signatureIn particular, the
setup()
has been changed torun_job
has been updated toFor an example of how to upgrade the Plugin, check out the ExampleLauncher's setup and run_job call
Update 2021-01-13:
For Hydra 1.2, the
hydra_context
argument torun_job
will no-longer be optional, as implemented in PR #1953.